#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int main()
{
    int fd = open("/dev/iram", O_RDWR | O_TRUNC);
    if (fd < 0) {
        printf("open failed!\n");
        return -1;
    }
    char buf[] = {0x12, 0x34, 0x56, 0x78, 0x90};
    int len = write(fd, buf, sizeof(buf));
    printf("write: %d\n", len);
    return 0;
}
